iOS 7 App Development Essentials by Neil Smyth

iOS 7 App Development Essentials by Neil Smyth

Author:Neil Smyth
Language: eng
Format: mobi
Publisher: Payload Media
Published: 2013-10-07T16:02:53+00:00


48.8 The UICollectionViewDelegate Protocol

The UICollectionViewDelegate protocol defines a set of optional methods which, if implemented, will be called when certain events take place within the corresponding collection. These methods relate primarily to handling user interaction with the collection view elements (such as selecting a specific cell). Some of the key methods in this protocol include:

· collectionView:shouldSelectItemAtIndexPath: - Returns a boolean value indicating whether the specified item is selectable by the user.

· collectionView:didSelectItemAtIndexPath: - Called by the collection view when the specified item has been selected by the user.

· collectionView:shouldDeselectItemAtIndexPath: - Returns a boolean value to indicate whether the specified item may be deselected by the user.

· collectionView:didDeselectItemAtIndexPath: - Called by the collection view when the specified item has been selected by the user.

· collectionView:shouldHighlightItemAtIndexPath: - Returns a boolean value indicating whether the specified item should be highlighted as a pre-cursor to possible selection by the user.

· collectionView:didHighlightItemAtIndexPath: - Called by the collection view when the specified item has been highlighted.

· collectionView:didUnhighlightItemAtIndexPath:- Called by the collection view when the specified item has been un-highlighted.

· collectionView:didEndDisplayingCell:forItemAtIndexPath:- Called by the collection view when the specified cell has been removed from the collection view.

· collectionView:didEndDisplayingSupplementaryView:forElementOfKind:atIndexPath:- Called by the collection view when the specified supplementary view has been removed from the collection view.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.